package com.yzyz.utils.json;

import java.util.List;

import com.yzyz.bean.BaseBean;

/**
 * 
 * @author David Sun
 * @Date   2010-3-5
 *
 */
public class JSONBase {
	private boolean leaf = false;
	
	private int id;
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean getLeaf() {
		return leaf;
	}

	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}

	private String text;
	
	private List<JSONBase> chidlren;
	
	private BaseBean baseBean;

	public BaseBean getBaseBean() {
		return baseBean;
	}

	public void setBaseBean(BaseBean baseBean) {
		this.baseBean = baseBean;
	}

	public List<JSONBase> getChidlren() {
		return chidlren;
	}

	public void setChidlren(List<JSONBase> chidlren) {
		this.chidlren = chidlren;
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
	public JSONBase(BaseBean baseBean) {
		this.baseBean 	= baseBean;
		this.text 		= this.baseBean.getName();
		this.id 		= this.baseBean.getId();
	}
	
	public JSONBase(){
		
	}
}
